<template>
    <div
        class="CountinuationCard"
        v-loading="pageLoading"
        element-loading-background="rgba(255, 255, 255, 0.7)"
    >
        <el-card class="box-card">
            <div slot="headerss" class="clearfix text_fl">
                <span>续卡</span>
                <el-button class="btn_close" type="text" @click="handleClose">关闭</el-button>
            </div>
            <div>
                <div v-show="!CardSuccessInfo">
                    <el-form
                        ref="formData"
                        :model="formData"
                        :inline="true"
                        label-position="right"
                        size="small"
                        label-width="150px"
                        class="formData_form_inline"
                    >
                        <el-row>
                            <el-col :span="11" :offset="1">
                                <el-form-item label="账户类别:" class="text_fl">
                                    <span class="el-form-item-span">{{CATEGORY_filter}}</span>
                                </el-form-item>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label="卡号:" class="text_fl">
                                    <el-input :disabled="true" v-model.trim="formData.CARDNO"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="11" :offset="1">
                                <el-form-item label="客户年龄:" class="text_fl" prop="AGE">
                                    <el-input :disabled="true" v-model.trim="formData.AGE"></el-input>
                                </el-form-item>
                                <span class="form_item_span">{{formData.AGE|judgeage}}</span>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label="是否已过期:" class="text_fl">
                                    <el-input
                                        :disabled="true"
                                        :value="formData.IFDUEDATE==='1'?'是':'否'"
                                    ></el-input>
                                </el-form-item>
                                <span class="form_item_span">{{formData.IFDUEDATE==='1'?'':'不通过'}}</span>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="11" :offset="1">
                                <el-form-item label="信用额度:" class="text_fl">
                                    <el-input :disabled="true" v-model.trim="formData.LIMIT"></el-input>
                                </el-form-item>
                                <span class="form_item_span">{{formData.LIMIT|judgelimitmpp}}</span>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label="是否有分期:" class="text_fl">
                                    <el-input
                                        :disabled="true"
                                        :value="formData.IFHASMPP==='1'?'是':'否'"
                                    ></el-input>
                                </el-form-item>
                                <span class="form_item_span">{{formData.IFHASMPP==='1'?'不通过':''}}</span>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="11" :offset="1">
                                <el-form-item label="卡状态:" class="text_fl" prop="AGE">
                                    <el-input
                                        :disabled="true"
                                        :value="formData.CARDSTAT|getcardstat(cardStatus)"
                                    ></el-input>
                                </el-form-item>
                                <span class="form_item_span">{{formData.CARDSTAT==='NX'?'不通过':''}}</span>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label="近24期逾期情况:" class="text_fl">
                                    <el-input :disabled="true" v-model.trim="formData.CUPAYM24"></el-input>
                                </el-form-item>
                                <span class="form_item_span">{{formData.CUPAYM24|judgepay}}</span>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="11" :offset="1">
                                <el-form-item label="是否黑名单:" class="text_fl" prop="AGE">
                                    <el-input
                                        :disabled="true"
                                        :value="formData.IFBLACK==='1'?'是':'否'"
                                    ></el-input>
                                </el-form-item>
                                <span class="form_item_span">{{formData.IFBLACK==='1'?'不通过':''}}</span>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label class="text_fl"></el-form-item>
                            </el-col>
                        </el-row>
                        <!-- 话术 -->
                        <div class="hstable_wrap" v-if="speechList.length!=0">
                            <el-table
                                :data="speechList"
                                border
                                stripe
                                header-row-class-name="headerRow"
                                ref="showListTable"
                                class="heard-bg business_table hstable"
                                @selection-change="handleSelectionChange"
                            >
                                <el-table-column type="selection" label=" " min-width="55"></el-table-column>
                                <el-table-column label="业务话术">
                                    <template slot-scope="scope">{{scope.row.content}}</template>
                                </el-table-column>
                            </el-table>
                        </div>
                        <div class="text_center">
                            <el-button
                                type="primary"
                                size="small"
                                @click.native="submitFormReissueCard"
                            >续卡初审</el-button>
                            <el-button
                                type="primary"
                                size="small"
                                @click.native="custupd"
                                v-show="ifshow"
                            >客户资料修改</el-button>
                            <el-button
                                type="primary"
                                size="small"
                                @click.native="jumpworkflow"
                                v-show="ifshow"
                            >续卡工单</el-button>
                            <!-- <el-button type="primary" icon="el-icon-refresh-right" size="small" @click="handleClickRemove">重置</el-button> -->
                        </div>
                    </el-form>
                    <!-- <el-dialog v-drag
                        title="续卡"
                        :visible.sync="centerDialogVisible"
                        width="30%"
                        :append-to-body="true"
                        top="30vh"
                        :close-on-click-modal="false"
                        center
                    >
                        <p>
                            卡号：
                            <span>{{formData.CARDNO}}</span>
                        </p>
                        <p>
                            寄送方式：
                            <span>{{formData.DSPCHCD|filterFormData(isDSPCHCDOption)}}</span>
                        </p>
                        <p>
                            收费标准：
                            <span>{{formData.REPLACEFEE|filterFormData(isREPLACEFEEOption)}}</span>
                        </p>
                        <p>
                            寄送地址：
                            <span>{{addressInfo}}</span>
                        </p>
                        <p class="text_center padding_top15">
                            <span style="color:#3a8ee6; ">您确定对该卡号进行续卡操作？</span>
                        </p>
                        <span slot="footer" class="dialog-footer">
                            <el-button size="small" @click="centerDialogVisible = false">取 消</el-button>
                            <el-button type="primary" size="small" @click="handerCardReissue"size="small" icon="el-icon-circle-check" >确定</el-button>
                        </span>
                    </el-dialog>-->
                </div>
                <div v-if="CardSuccessInfo">
                    <countinuation-card-item :CardSuccessInfo="CardSuccessInfo"></countinuation-card-item>
                </div>
            </div>
        </el-card>
    </div>
</template>
<script>
import { mapGetters } from 'vuex';
import moment from 'moment';
import countinuationCardItem from './components/countinuationCardItem';
import {
    closePage, getDictSelectList, itoStr, trimString, getDictMappingValue, componentCost, setICCardInfo, setETCCardInfo, getBusinessMenuId, getNewCUPAYM24
} from '@/utils/Common';

export default {
    name: 'CountinuationCard',
    data() {
        return {
            formData: {
                // REPLACEFEE: '',
                // DSPCHCD: '',
                CARDNO: '',
                AGE: '',
                IFDUEDATE: '',
                LIMIT: '',
                IFHASMPP: '',
                CARDSTAT: '',
                CUPAYM24: '',
                IFBLACK: '',
            },
            isDSPCHCDOption: [], // 递卡方式 isDESPATCHOption DSPCHCD
            isCARDTOOption: [], // 卡片递送地址类型
            isREPLACEFEEOption: [], // 换卡费用代码选项
            // isCOURIERFEEOption: [], // 递送费用代码选项
            CardSuccessInfo: '', //续卡成功后的信息
            centerDialogVisible: false, // 弹框是否显示
            centerDialogVisibleValue: false,//
            PRODUCT_value: '', // //卡产品 在数据字典里的值
            CATEGORY_filter: '',
            productId: '',
            rules: {
                // EMBNAME: [{ required: true, message: '凸字姓名不能为空！', trigger: 'blur' }],
                DSPCHCD: [{ required: true, message: '递卡方式不能为空！', trigger: 'change' }],
                CARDTO: [
                    { required: true, message: '卡片递送地址类型不能为空！', trigger: 'change' },
                    // {type:'string',message:'卡片递送地址类型为字符串',whitespace:true}
                ],
                COURIERFEE: [{ required: true, message: '递送费用不能为空！', trigger: 'change' }],
                REPLACEFEE: [{ required: true, message: '补卡费用不能为空！', trigger: 'change' }],
            },
            Card_STAT: '',
            pageLoading: false,
            addressInfo: '',//详细地址信息
            BALANCE_value: '',//ic  3096的BALANCE 值
            ETCSTATUS_value: false,//3134ETC签约关系查询交易接口
            COST_value: '0',//补卡费用 单纯用来展示 计算后的补卡费用
            cardtype: '',//补卡费用字典
            PRODUCT: '',//
            result3077: {},
            result3100: {},
            cardStatus: [],
            auditpass: true,
            ifshow: false,
            speechList: [],//话术列表
            selectedList: [],
            MenuId: '',
        };
    },
    components: {
        countinuationCardItem,
    },
    filters: {
        filterFormData: (value, Diction_option) => {
            value = (`${value}`).trim();
            if (value === '') return '';
            for (let index = 0; index < Diction_option.length; index++) {
                const element = Diction_option[index];
                if (element.code === value) {
                    return element.label;
                }
            }
            return value;
        },
        // 卡片状态
        getcardstat(text, list) {
            text = (`${text}`).trim();
            let txt = '';
            list.forEach((item) => {
                if (item.code === text) {
                    txt = item.label;
                }
            });
            if (text === '') {
                txt = '正常';
            }
            return txt;
        },
        judgeage(val) {
            let txt = '';
            if (parseInt(val) > 65) {
                txt = '不通过';
            } else {
                txt = '';
            }
            return txt;
        },
        judgepay(val) {
            let text = (`${val}`).trim();
            let txt = '';
            //如果出现CDEFGHIJKLMNOPQ,不通过
            //近24期3次逾期1期或2次逾期2期或1次逾期3期（3次逾期1期为NN1N1N1N,2次逾期2期为NN12N12N,1次逾期3期为NN123N），不通过
            if (text.indexOf('7') != -1 || text.indexOf('6') != -1 || text.indexOf('5') != -1 || text.indexOf('4') != -1
                || text.indexOf('3') != -1) {
                txt = '不通过';
            }
            if (text.split('2').length >= 3) {//B出现两次及以上，不通过
                txt = '不通过';
            }
            let sum = 0;
            for (let i in text.split('')) {
                let a = Number(text.split('')[i]);
                if (a >= 0 && a <= 9) {
                    sum++;
                }

            }
            if (sum >= 3) {//A出现三次及以上，不通过
                txt = '不通过';
            }
            return txt;
        },
        judgelimitmpp(limit) {
            let txt = '';
            if (parseFloat(limit) === 0) {
                txt = '不通过';
            }
            return txt;
        },
    },
    computed: {
        ...mapGetters([
            'cardInfo_3004',
            'customerAdressInfo_3003',
            'customerInfo_3002',
            'CreditCardHistory_3054',
            'defaultParams',
            'pinFlag',
            'isCurrentMenuInfo',
            'businessMenu',
        ]),
    },
    async mounted() {
        this.MenuId = this.$route.params.id || '';
        this.pageLoading = true;
        this.formData = {
            CATEGORY: this.cardInfo_3004.CATEGORY, // 账户类别
            CARDNO: this.cardInfo_3004.CARDNO, // 卡号
            CARDNBR: this.cardInfo_3004.CARDNO, // 卡号
            COURIERFEE: '2', // 递送费用代码 COURIERFEE 默认给外地的值 2
            REPLACEFEE: `${this.cardInfo_3004.REPLACEFEE}`, // 换卡费用代码 REPLACEFEE
            CARDTO: `${this.customerAdressInfo_3003.STSMAIL.trim()}`, // /卡片递送地址类型
            DSPCHCD: 'POST', // this.cardInfo_3004.DESPATCH,//递卡方式
            ISSRSN: 'X', // 换卡原因 卡到期 续卡
            CHECKFLG: '000000000000000', // 检查项目选择
            CDFRM: 'A', // 卡片版面  必填字段 可以给四个空格
            PINREQD: '0', // 是否产生PIN 1:不产生PIN 0:产生PIN
            PINFLAG: this.pinFlag,

            // EMBNAME_filter: '',//// 凸字姓名
            // RTNIND_value: '',
            // EMBNAME: this.disPoseName(this.cardInfo_3004.EMBNAME), // 凸字姓名
            // DESPATCH:'POST',//预定递送方式或递送方式
            // KEEPYN: '1', // 换卡保留卡号选项
            // CDISSFLAG: '0', // 即时制卡 0：否（默认）1：是

        };

        await this.init();
        this.Card_STAT = (this.cardInfo_3004.CARDSTAT + '').trim();
        this.productId = this.cardInfo_3004.PRODUCT;
        this.PRODUCT = (this.cardInfo_3004.PRODUCT + '').trim();
        // dspchcd cardto
        //this.getDictInfovalue();
        //  this.isREPLACEFEEOption=this.getDictInfo("COURFEE");
        //  this.isCOURIERFEEOption=this.getDictInfo("REPFEE");
        // 3096IC卡交易明细查询
        //setICCardInfo(this.formData.CARDNO, this);
        // 3134ETC签约关系查询交易接口
        //setETCCardInfo(this.formData.CARDNO, this);
        this.pageLoading = false;
        await this.getspeechList();
    },

    methods: {
        async init() {
            // 账户类型
            this.CATEGORY_filter = await getDictMappingValue('CATE', this.cardInfo_3004.CATEGORY, this);
            this.cardStatus = await getDictSelectList('CLOCD', this);
            //计算客户年龄
            if ((this.customerInfo_3002.BIRTHDAY + '').trim() != '') {
                let birthyear = (this.customerInfo_3002.BIRTHDAY + '').substring(0, 4);
                let nowyear = moment(new Date()).format('YYYY');
                let age = parseInt(nowyear) - parseInt(birthyear);
                this.formData.AGE = age;
            }

            //判断卡片有效期,0未过，1-过期
            let expire = this.cardInfo_3004.EXPIRE;
            let nowdate = moment(new Date()).format('YYYYMMDD');
            console.log("expire|" + expire + "|nowdate|" + nowdate.substring(2, 6) + "|");
            if (parseInt(expire) > parseInt(nowdate.substring(2, 6))) {
                this.formData.IFDUEDATE = '0';
            } else {
                this.formData.IFDUEDATE = '1';
            }

            //信用额度
            this.formData.LIMIT = this.cardInfo_3004.CRDLIMT;

            //判断是否有分期，0-无，1-有
            await this.get3077();
            console.log("result3077", this.result3077);
            if (this.result3077.sysHead.rspCd === '000000' && this.result3077.body.appBody.dataList.length > 0) {
                this.formData.IFHASMPP = '1';
            } else {
                this.formData.IFHASMPP = '0';
            }

            //卡状态
            this.formData.CARDSTAT = this.cardInfo_3004.CARDSTAT.trim();

            //近24期还款情况
            this.formData.CUPAYM24 = await getNewCUPAYM24(this.CreditCardHistory_3054.CUPAYM24);

            //是否黑名单，0-不是，1-是
            this.formData.IFBLACK = '0';
            await this.get3100();
            console.log("this.result3100:", this.result3100);
            if (this.result3100.sysHead.rspCd === '000000' && this.result3100.body.appBody.dataList.length > 0) {
                this.formData.IFBLACK = '1';
            }
        },
        //根据菜单id查询话术列表
        async getspeechList() {
            console.log("this.isCurrentMenuInfo.id", this.isCurrentMenuInfo.id);
            console.log("this.MenuId", this.MenuId);
            var checkParam = {
                'id': this.MenuId || this.isCurrentMenuInfo.id,
            };
            this.$post.busiMenu.getlistByMenuId(checkParam).then((res) => {
                console.log("话术查询结果：", res);
                if (res.status === 200) { // http通讯成功
                    if (res.data.status == 0) { // 业务请求成功
                        this.speechList = res.data.content;
                    }
                }
            });
        },
        handleSelectionChange(val) {
            this.selectedList = val;
        },
        async get3077() {
            const appBody = {
                CARDNBR: this.cardInfo_3004.CARDNO, // 卡号
                // 空或Z：全部  A：灵活分期 C：信用计划分期 B：余额转移 H：银联POS分期 L：大额分期 M：邮购分期  P：自行POS分期 S：深圳银联POS分期 Y：余额/账单分期 D：自动分期
                MPTYPE: '', // 分期付款类型
                OPERCODE: 1, // 操作代码  0全部返回  1可提前还款的分期交易    2可撤销的分期交易
                OPT: '1', // 查询方式 1-用卡号查询 2-用证件号码查询
                //CATE: this.accountType, // 账户类别 查询方式为2时，必填
                PINFLAG: '0', // 是否检查密码标志
                BEGDAY: "20000101", // 起始日期
                ENDDAY: moment(new Date()).format('YYYYMMDD'), // 结束日期 两个月 内的
                RTNIND: '',// 翻页标志 首次传空， 翻页传1
                NEXTDAY: '',// 首次查询时送查询起始日期， 下翻页查询时上送上次查询结果的最后一条记录返回的分期付款交易日期
                NEXTMPNO: '',// 首次查询时送起始序号，默认为0 下翻页查询时上送上次查询结果的最后一条记录返回的交易序号
            };
            const defaultParams = JSON.parse(JSON.stringify(this.defaultParams));
            defaultParams.body.appHead.tranCode = '3077';
            defaultParams.body.appBody = appBody;
            // 3077交易

            await this.$post.common.transPort(defaultParams).then((res) => {
                if (res.status === 200) {
                    this.result3077 = JSON.parse(res.data.jsonRes);

                }
            });
        },
        async get3100() {
            const appBody = {
                CUSTID: this.cardInfo_3004.CUSTID, // 证件号码
                KEYTYPE: this.cardInfo_3004.KEYTYPE, // 证件类型
                INSFLAG: '1', //查询方式 1-用证件号码查询
                RTNIND: '',// 翻页标志 首次传空， 翻页传1
            };
            const defaultParams = JSON.parse(JSON.stringify(this.defaultParams));
            defaultParams.body.appHead.tranCode = '3100';
            defaultParams.body.appBody = appBody;
            // 3077交易

            await this.$post.common.transPort(defaultParams).then((res) => {
                if (res.status === 200) {
                    this.result3100 = JSON.parse(res.data.jsonRes);
                }
            });
        },
        // 请求数据字典里的字段
        // async getDictInfovalue() {
        //     // 递卡方式
        //     this.isDSPCHCDOption = await getDictSelectList('DSPCHCD', this);
        //     // 寄送地址类型
        //     this.isCARDTOOption = await getDictSelectList('MAILINGADDRESS', this);
        //     // 换卡费用代码
        //     this.isREPLACEFEEOption = await getDictSelectList('REPFEE', this);
        //     // 递送费用代码
        //     // this.isCOURIERFEEOption = await getDictSelectList('COURFEE', this);
        //     // 补卡费用代码
        //     this.cardtype = await getDictSelectList('CARDTYPE', this);
        //     // 卡产品
        //     this.PRODUCT_value = await getDictMappingValue('PRODUCT', this.cardInfo_3004.PRODUCT, this);
        //     // 账户类型
        //     this.CATEGORY_filter = await getDictMappingValue('CATE', this.cardInfo_3004.CATEGORY, this);
        //     // this.getExecuteFun();
        //     // this.disPoseName(this.cardInfo_3004.EMBNAME, this.cardInfo_3004.EMBOSSSUL, this.cardInfo_3004.EMBOSSSUR);
        //     this.pageLoading = false;
        //     this.getAddressInfo(this.formData.CARDTO);
        // },
        // 页面校验拦截
        // async getExecuteFun() {
        //     this.productId = itoStr(this.cardInfo_3004.PRODUCT, 4);
        //     if (this.productId === '0046') {
        //         this.$alert(
        //             `此卡为: ${this.PRODUCT_value}\n续卡功能锁定，跳转至保号换卡工单界面申请！`,
        //             '续卡提示',
        //             { customClass: 'warning', type: 'warning', showClose: false },
        //         ).then(() => {
        //             closePage(this.$route, this, 1);
        //         });
        //     }
        //     if (this.Card_STAT.trim() === 'H' || this.Card_STAT.trim() === "O") {
        //         // 判断当前卡的可用额度和信用额度是否相等
        //         if (this.cardInfo_3004.CRDLIMT !== this.cardInfo_3004.AVLIMT) {
        //             this.$alert(
        //                 `当前客户有欠款，请还款后再致电续卡`,
        //                 '续卡提示',
        //                 { customClass: 'warning', type: 'warning', showClose: false },
        //             ).then(() => {
        //                 closePage(this.$route, this, 1);
        //             });
        //         }
        //     } else if (this.Card_STAT.trim() === 'U') {
        //         this.$alert(
        //             `当前卡片为睡眠卡，请先转为未激活状态，再进行续卡操作`,
        //             '续卡提示',
        //             { customClass: 'warning', type: 'warning', showClose: false },
        //         ).then(() => {
        //             closePage(this.$route, this, 1);
        //         });
        //     };
        // },
        // // 根据地址类型 拼接详细的地址
        // getAddressInfo(val) {
        //     switch (val) {
        //         case this.customerAdressInfo_3003.ADD2TYPE://公司地址
        //             this.addressInfo = (this.customerAdressInfo_3003.ADD21 + '').trim() + (this.customerAdressInfo_3003.ADD22 + '').trim() + (this.customerAdressInfo_3003.ADD23 + '').trim() + (this.customerAdressInfo_3003.ADD24 + '').trim();
        //             console.log('this.addressInfo', this.addressInfo);
        //             break;
        //         case this.customerAdressInfo_3003.ADD3TYPE: //户籍
        //             this.addressInfo = (this.customerAdressInfo_3003.ADD31 + '').trim() + (this.customerAdressInfo_3003.ADD32 + '').trim() + (this.customerAdressInfo_3003.ADD33 + '').trim() + (this.customerAdressInfo_3003.ADD34 + '').trim();
        //             console.log('this.addressInfo', this.addressInfo);

        //             break;
        //         case this.customerAdressInfo_3003.ADD1TYPE://家庭
        //             this.addressInfo = (this.customerAdressInfo_3003.ADD11 + '').trim() + (this.customerAdressInfo_3003.ADD12 + '').trim() + (this.customerAdressInfo_3003.ADD13 + '').trim() + (this.customerAdressInfo_3003.ADD14 + '').trim();
        //             console.log('this.addressInfo', this.addressInfo);

        //             break;
        //         case this.customerAdressInfo_3003.ADD4TYPE://房产
        //             this.addressInfo = (this.customerAdressInfo_3003.ADD41 + '').trim() + (this.customerAdressInfo_3003.ADD42 + '').trim() + (this.customerAdressInfo_3003.ADD43 + '').trim() + (this.customerAdressInfo_3003.ADD44 + '').trim();
        //             console.log('this.addressInfo', this.addressInfo);

        //             break;
        //         case 'O'://其他
        //             this.addressInfo = (this.customerAdressInfo_3003.RTNADD41 + '').trim() ? ((this.customerAdressInfo_3003.RTNADD41 + '').trim() + (this.customerAdressInfo_3003.RTNADD42 + '').trim() + (this.customerAdressInfo_3003.RTNADD43 + '').trim() + (this.customerAdressInfo_3003.RTNADD44 + '').trim()) : ((this.customerAdressInfo_3003.RTNADD4TYPE + '').trim() ? (this.customerAdressInfo_3003.RTNADD4TYPE + '').trim() : '');
        //             console.log('this.addressInfo', this.addressInfo);

        //             break;
        //         default:
        //             this.addressInfo = '';
        //     }
        // },
        // // 开始续卡操作
        // handerCardReissue() {
        //     this.setsubmitForm();
        //     this.centerDialogVisible = false;
        // },
        // 从数据字典里查  产品编号对应的文字
        submitFormReissueCard() {
            if (parseInt(this.formData.AGE) > 65) {
                this.auditpass = false;
            }
            if (this.formData.IFDUEDATE === '0') {
                this.auditpass = false;
            }
            if (this.formData.IFBLACK === '1') {
                this.auditpass = false;
            }
            if (this.cardInfo_3004.CARDSTAT === 'NX') {
                this.auditpass = false;
            }
            if (parseFloat(this.cardInfo_3004.CRDLIMT) === 0 && this.formData.IFHASMPP === '0') {
                this.auditpass = false;
            }

            let pay24 = this.formData.CUPAYM24;
            if (pay24.indexOf('C') != -1 || pay24.indexOf('D') != -1 || pay24.indexOf('E') != -1 || pay24.indexOf('F') != -1
                || pay24.indexOf('G') != -1 || pay24.indexOf('H') != -1 || pay24.indexOf('I') != -1 || pay24.indexOf('J') != -1
                || pay24.indexOf('K') != -1 || pay24.indexOf('L') != -1 || pay24.indexOf('M') != -1 || pay24.indexOf('N') != -1
                || pay24.indexOf('O') != -1 || pay24.indexOf('P') != -1 || pay24.indexOf('Q') != -1 || pay24.split('B').length >= 3 || pay24.split('A').length >= 4) {
                this.auditpass = false;
            }

            if (this.auditpass) {
                this.ifshow = true;
            } else {
                this.$alert('初审不通过，请查看红色标识部分不通过项目', '续卡', { customClass: 'error', type: 'error' });

            }

        },

        custupd() {
            this.MenuId = getBusinessMenuId('/customerInfomationChange/customerInfoChange', this.businessMenu);
            console.log('this.MenuId____', this.MenuId);
            this.$router.push({ name: 'customerInfoChange', path: '/customerInfomationChange/customerInfoChange', params: { id: this.MenuId } });
        },
        jumpworkflow() {
            console.log("this.selectedList.length", this.selectedList.length);
            if (this.selectedList.length != this.speechList.length) {
                this.$alert('话术尚未全部勾选！', '提示', {
                    customClass: 'warning', type: 'warning',
                });
                return;
            }
            this.$alert('此功能暂未开放', '续卡', { customClass: 'error', type: 'error' });
        },

        // 处理 凸字姓名
        // name 凸字姓名  number 截取位数
        // disPoseName(name) {
        //     const number = this.cardInfo_3004.EMBOSSSUL;
        //     const number2 = this.cardInfo_3004.EMBOSSSUR
        //     let nameValue = '';
        //     nameValue = name.substring(0, number - 1);
        //     nameValue = `${nameValue}/${name.substring(number - 1, number2)}`;
        //     nameValue = `${nameValue}/${name.substring(number2)}`;
        //     nameValue && (nameValue = (`${nameValue}`).trim());
        //     return nameValue;
        // },
        // 处理 凸字姓名
        // name 凸字姓名  number 截取位数
        // disPoseName(name, number, number2) {
        //     let nameValue = '';
        //     nameValue = name.substring(0, number - 1);
        //     nameValue = `${nameValue}/${name.substring(number - 1, number2)}`;
        //     nameValue = `${nameValue}/${name.substring(number2)}`;
        //     nameValue && (nameValue = (`${nameValue}`).trim());
        //     return nameValue;
        // },
        // 下拉选 触发事件
        // componentCostFun(val) {
        //     console.log('val', val);
        //     componentCost(val, this);
        // },
        // // 发送请求 开始续卡  4091
        // setsubmitForm() {
        //     const defaultParams = JSON.parse(JSON.stringify(this.defaultParams));
        //     defaultParams.body.appBody = Object.assign(this.defaultParams.body.appBody, this.formData);
        //     // defaultParam.body.appBody = {
        //     //     PINFLAG: this.pinFlag,
        //     //     PIN: '',
        //     //     CARDNO: this.formData.CARDNO, // 卡号
        //     //     CARDNBR: this.formData.CARDNO, // 卡号
        //     //     CANCODE: '',//this.formData.CANCODE,// 挂失代码
        //     //     LOSTTYPE: this.formData.LOSTTYPE,// LOSTTYPE 挂失方式  LTR信函挂失 PHN电话挂失  VTB到分行挂失 VTC到信用卡中心挂失
        //     //     OPTION: this.formData.OPTION,
        //     // }
        //     defaultParams.body.appHead.tranCode = '4091';// 修改交易号
        //     console.log(defaultParams);
        //     this.$post.common.transPort(defaultParams).then((res) => {
        //         if (res.status === 200) { // 请求成功
        //             const cardlossofs = JSON.parse(res.data.jsonRes);
        //             if (cardlossofs.sysHead.rspCd == '000000') { // 交易成功
        //                 console.log(cardlossofs, 'cardlossofs');
        //                 this.CardSuccessInfo = cardlossofs;
        //                 this.CardSuccessInfo.CATEGORY_filter = this.CATEGORY_filter;
        //                 this.centerDialogVisibleValue = true;

        //             } else {
        //                 const ErrorMessage = `错误码：${cardlossofs.sysHead.rspCd} ` + `错误信息：${cardlossofs.sysHead.rspMsg}`;
        //                 this.$alert(ErrorMessage, cardlossofs.sysHead.busiName, { customClass: 'error', type: 'error' });
        //             }
        //         }
        //         this.centerDialogVisible = false; // 关闭弹框
        //     });
        // },


        // 重置 功能
        handleClickRemove() {
            this.formData.DSPCHCD = '';
            // this.formData.EMBNAME_filter = '';
            this.formData.REPLACEFEE = '';
            // this.formData.CARDTO = '';
        },
        // 点击关闭
        handleClose() {
            closePage(this.$route, this, 1);
        },
    },
};
</script>
<style lang='scss' >
.CountinuationCard {
    /* .el-form-item-span {
        background-color: #f5f7fa;
        border-color: #e4e7ed;
        color: #606266;
        cursor: not-allowed;
        width: 250px;
        min-width: 200px;
        height: 35px;
        line-height: 35px;
        display: inline-block;
        background-image: none;
        border-radius: 4px;
        border: 1px solid #dcdfe6;
        box-sizing: border-box;
        padding: 0 15px;
    } */
    .el-card__header {
        padding: 8px !important;
    }

    .el-form-item__content {
        text-align: left;
    }

    .form_item_span {
        color: red;
        display: inline-block;
        line-height: 32px;
    }
    .textSpan {
        width: 250px;
    }
    .el-dialog__body p {
        text-align: left;
        padding-left: 30%;
        margin: 8px 5px;
        span {
            color: #3a8ee6;
        }
    }
    .el-card.is-always-shadow {
        -webkit-box-shadow: none;
        box-shadow: none;
    }
    .el-card {
        border: none;
    }
    .el-form-item--small.el-form-item {
        margin-bottom: 8px;
    }
}
</style>

<style lang="scss" scope>
</style>